﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="PhotoList.aspx.vb" Inherits="webphototype.WebForm1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="GridView1" runat="server" AllowSorting="True" 
        AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="KOPDB">
        <Columns>
            <asp:BoundField DataField="PhotoName" HeaderText="PhotoName" 
                SortExpression="PhotoName" />
            <asp:BoundField DataField="PhotoDate" HeaderText="PhotoDate" 
                SortExpression="PhotoDate" />
            <asp:BoundField DataField="Author" HeaderText="Author" 
                SortExpression="Author" />
            <asp:BoundField DataField="Category" HeaderText="Category" 
                SortExpression="Category" />
            <asp:BoundField DataField="Resolution" HeaderText="Resolution" 
                SortExpression="Resolution" />
            <asp:HyperLinkField DataNavigateUrlFields="Location" 
                DataNavigateUrlFormatString="https://maps.google.com/maps?q={0}" 
                DataTextField="Location" HeaderText="Location" />
            <asp:ImageField DataImageUrlField="Image" HeaderText="Image">
                <ControlStyle CssClass="image" />
            </asp:ImageField>
            <asp:BoundField DataField="Remark" HeaderText="Remark" 
                SortExpression="Remark" />
            <asp:HyperLinkField DataNavigateUrlFields="ID" 
                DataNavigateUrlFormatString="PhotoDetails.aspx?ID={0}" HeaderText="Detail" 
                Text="Detail" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="KOPDB" runat="server" 
        ConnectionString="<%$ ConnectionStrings:KOPphotoConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:KOPphotoConnectionString.ProviderName %>" 
        SelectCommand="SELECT * FROM [photos]"></asp:SqlDataSource>
</asp:Content>
